<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue动画1</title>
    <style type="text/css">
        #box {
            width: 100px;
            height: 100px;
            background-color: #41B883;
        }
        .aa-transition{
            transition: 1s all ease;
        }
        .aa-enter{
            opacity: 0;
        }
        .aa-leave{
            opacity: 0;
        }
    </style>
</head>
<body>
<div id="wrap">
    <button @click="isShow">按钮</button>
    <!-- vue2.0已经放弃这种写法-->
    <div id="box" v-show="sign" transition="aa"></div>
</div>
</body>
</html>
<script src="../vue02/vue.js"></script>
<script type="text/javascript">
    window.onload=function () {
        var vm=new Vue({
            el:'#wrap',
            data:{
                sign:true,
            },
            methods: {
                isShow:function () {
                    this.sign=!this.sign;
                }
            }
        })
    }
</script>